home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / mg2a_src.zip / MG.TEX (.txt) < prev    next >
LaTeX Document  |  1988-08-23  |  52KB  |  1,022 lines

  1. \batchmode %be nice to fellow VAXers
  2. \hoffset=0in \voffset=0in %correct dvi2ln3 bug
  3. \documentstyle[11pt,titlepage]{report}
  4. %\pagestyle{headings} %not sure on this one yet
  5. %\parindent=0in
  6. \textwidth=6in
  7. \oddsidemargin=0.25in
  8. % definitions for DEFINE environment
  9. \newlength{\lblwide}
  10. \newcommand{\resetmarg}{\settowidth{\leftmargin}{\makebox[\lblwide]{}\makebox[\labelsep]{}}}
  11. \newcommand{\resetlbl}{\setlength{\labelwidth}{\lblwide}} 
  12. \newenvironment{define}[1]{\begin{list}{}{\settowidth{\lblwide}{\bf #1}\resetmarg \resetlbl}}{\end{list}}
  13. % definitions for fn environment
  14. \newcommand{\fname}[3]{\hspace{1em}\\{\tt #1}\index{#1} {\it #2}\hfill{\tt #3}}
  15. \newcommand{\fmore}[3]{\\{\tt #1}\index{#1} {\it #2}\hfill{\tt #3}}
  16. \newcommand{\fbody}{\\[0.5em]}
  17. % definitions for making the index
  18. \newcommand{\indexentry}[2]{\item {\tt #1} \dotfill\  #2}
  19. \setcounter{secnumdepth}{5} %personal preference
  20. \setcounter{tocdepth}{5} %personal preference
  21. \author{Sandra J. Loosemore}
  22. \title{The MG Reference Manual \\ Release MG2A}
  23. \date{\vspace{1.5in}
  24. Copyright \copyright 1987, Sandra J. Loosemore \\[0.5em]
  25. \parbox{5 in}{This document, or sections of this document, may be freely
  26. redistributed provided that the copyright notice and the following disclaimer
  27. remain intact:  The author bears no responsibilities for errors in
  28. this document or the software it describes; and shall not be held liable
  29. for any indirect, incidental, or consequential damages.}}
  30. \makeindex %usually not
  31. \begin{document}
  32. \maketitle
  33. \tableofcontents
  34. \chapter{Introduction}
  35. MG is a small, fast, and portable Emacs-style text editor intended to
  36. be used by people who can't run a real Emacs for one reason or another
  37. --- as their main editor on smaller machines with limited memory or
  38. file space, or as a ``quick-start'' editor on larger systems, useful
  39. for composing short mail messages and the like. 
  40. We've made MG compatible with GNU Emacs because that is the ``big'',
  41. full-featured editor that many of us use regularly and are most
  42. familiar with.  GNU Emacs is the creation of Richard M. Stallman, who
  43. was also the author of the original Emacs editor.  However, MG is not
  44. associated in any way with the GNU project, and the MG authors
  45. individually may or may not agree with the opinions expressed by
  46. Richard Stallman and the GNU project. 
  47. MG is largely public domain.  You can use, modify, and redistribute MG
  48. as you like.  A few modules, however, are copyrighted; specifically,
  49. the regular expression code, the VMS termcap routines, and the Amiga
  50. support code.  Look at the source code for the exact copyright
  51. restrictions. 
  52. There are several other editors in existence which call themselves
  53. MicroEmacs.  The original public domain version was written by Dave
  54. Conroy and circulated as version 1.6.  Derived from this, there is
  55. another PD version by Dave Conroy numbered v30; a significantly larger
  56. PD version by Daniel Lawrence which is now up to version 3.9; at least
  57. one proprietary implementation; an implementation for the Atari ST
  58. with an integrated command shell, by Prabhaker Mateti; and probably
  59. others that we don't know about.
  60. MG is derived from the v30 MicroEmacs, with key bindings, command
  61. names, and general functionality made more compatible with GNU Emacs.
  62. Like v30, MG is fairly small and quite robust.  We have generally
  63. resisted the temptation to overfeaturize.  Some features which are
  64. large and complex are flagged for conditional compilation.
  65. Many people have contributed their time to developing, improving, and
  66. porting MG.  Mike Meyer, Mic Kaczmarczik, and Bob Larson deserve 
  67. particular mention for their efforts.  
  68. Questions, suggestions, and offers of help should be addressed to:
  69. \begin{verbatim}
  70.         mg-developers@ucbvax.berkeley.edu   (ARPA)
  71.         ucbvax!mg-developers                (UUCP)
  72. \end{verbatim}
  73. \section{Implementations of MG}
  74. MG runs on many different kinds of hardware under many different 
  75. operating systems.  Currently, these include:
  76. \begin{itemize}
  77. \item 4.2 and 4.3 BSD Unix (including Ultrix-32)
  78. \item System V Unix
  79. \item VAX/VMS
  80. \item Primos
  81. \item OS9/68k
  82. \item Amiga
  83. \item Atari ST
  84. \item MS-DOS
  85. \end{itemize}
  86. This document describes release MG2A.  When we talk of different
  87. versions of MG in this manual, the term {\em version\/} is used to
  88. refer to the different support MG provides for the various machines
  89. and operating systems it runs under, not to different releases of MG
  90. itself.  For example, we might speak of how the VMS version of MG
  91. differs from the Unix version.
  92. As mentioned above, some MG commands may not be implemented in all
  93. versions; these are noted in the documentation.  Some versions of MG
  94. also support features (such as mouse handling) that are not described
  95. here.
  96. \section{A Note on Character Sets}
  97. MG uses the 128-character ASCII character set, and provides support for
  98. 8-bit characters.  Whether the particular version of MG that you are running
  99. knows about extended character sets depends on whether your terminal and
  100. the host operating system know about them.  Moreover, since there is no
  101. standard 8-bit character set, the same character codes will probably
  102. give different glyphs on different systems.  Most versions of MG use
  103. the DEC multinational character set.
  104. \section{Notation and Conventions}
  105. In this manual, commands and other things that must be typed in 
  106. literally are indicated in a typewriter font, like {\tt next-line}.
  107. Placeholders such as command argument names use an italic font.
  108. The terms {\em command\/} and {\em function\/} are synonymous.  We often
  109. speak of a command being bound to a particular {\em key\/}, although you 
  110. may actually have to type more than one character to form a single key.
  111. Most commands are bound to keys with {\em control\/} and {\em meta\/} 
  112. modifiers.
  113. To type a control character, use the control key on your
  114. keyboard like a shift key:  hold down the control key while typing the
  115. character.  In this manual, we will indicate control characters like
  116. \verb"C-x" --- here, typing the character ``x'' while holding down
  117. the control key.
  118. Some keyboards also have a meta key that works like the control
  119. key.  (It may be labelled something else;  on the Atari ST, for example,
  120. the key marked  ``Alternate'' is the meta key.)  If your keyboard doesn't
  121. have a meta key, don't panic.  You can also use the escape key as a meta
  122. prefix; first type the escape, and {\em then\/} the character.  Meta
  123. characters will be indicated as \verb"M-x".
  124. Besides the meta prefix, two other characters are used as prefixes:
  125. \verb"C-x" and \verb"C-h".  A few keys have special notation:  {\tt SPC} is
  126. the space character, {\tt DEL} is the delete or rubout character, {\tt RET}
  127. is carriage return, and {\tt ESC} is the escape character.  {\tt NUL} is 
  128. the null character (ASCII 0), which is usually equivalent to either 
  129. \verb"C-SPC" or \verb"C-@".
  130. Uppercase and lowercase characters are generally equivalent in command
  131. keystrokes.
  132. When you run MG from a shell, command line arguments are interpreted as the
  133. names of files you want to {\em visit\/}, or edit.  Each file is 
  134. read into a {\em buffer\/} in memory.  No changes are actually made to 
  135. the file until you ask it to be written out to disk.
  136. Within MG, the large top part of the screen serves as a {\em window\/} into
  137. the buffer being edited.  Below this is the {\em mode line\/}, which 
  138. displays the name of the buffer.  Finally, at the very bottom of the screen,
  139. there is a one-line {\em minibuffer\/} which is used for displaying
  140. messages and answering questions.
  141. MG keeps track of two pointers into each window, the {\em point\/} and the
  142. {\em mark\/}.  The {\em cursor\/} appears at the point in the current
  143. window, and we often speak of moving the cursor rather than of moving the
  144. point.  The text between the point and the mark is referred to as the {\em
  145. region\/}.
  146. Some commands deal with {\em words\/} and {\em paragraphs\/}.
  147. Generally, whitespace and punctuation separate words.  Lines that are
  148. empty or that contain only spaces or tabs separate paragraphs without
  149. being part of a paragraph.  A non-empty line that starts with a space
  150. or tab also begins a new paragraph. 
  151. A number of commands are defined as {\em toggles\/}.  If no prefix argument
  152. is supplied, these commands toggle an action.  The action is turned on if a 
  153. negative or zero argument is supplied, and turned on if a positive argument
  154. is supplied.
  155. \section{Getting Started}
  156. This document is intended primarily as a reference manual.  If you
  157. have never used any Emacs-like text editor before, it is strongly
  158. suggested that you run the on-line tutorial supplied with the MG
  159. distribution, instead of reading this manual.
  160. Do not be put off by the large number of commands described in this
  161. manual!  It is possible to get by with only a handful of basic commands.
  162. Here are the ones that are probably used most frequently:
  163. \begin{define}{\hspace{1in}}
  164. \item[{\tt C-p}\hfill] Move the cursor to the previous line
  165. \item[{\tt C-n}\hfill] Move the cursor to the next line
  166. \item[{\tt C-b}\hfill] Move the cursor backwards
  167. \item[{\tt C-f}\hfill] Move the cursor forwards
  168. \item[{\tt C-v}\hfill] Scroll forwards one screenful
  169. \item[{\tt M-v}\hfill] Scroll backwards one screenful
  170. \item[{\tt M-<}\hfill] Go to the beginning of the buffer
  171. \item[{\tt M->}\hfill] Go to the end of the buffer
  172. \item[{\tt C-a}\hfill] Go to the beginning of the line
  173. \item[{\tt C-e}\hfill] Go to the end of the line
  174. \item[{\tt DEL}\hfill] Delete the previous character
  175. \item[{\tt C-k}\hfill] Kill (delete) to the end of line
  176. \item[{\tt C-y}\hfill] Reinsert killed text.
  177. \item[{\tt C-x C-c}\hfill] Exit MG
  178. \item[{\tt C-x C-s}\hfill] Save the current buffer
  179. \end{define}
  180. \chapter{Using Commands}
  181. \section{Command Arguments}
  182. Some commands require arguments.  For example, if you want to read a
  183. file into a buffer, you must type in the name of the file.  In the
  184. descriptions of commands in this manual, if arguments are required,
  185. they are listed following the command name.
  186. MG prompts for command arguments in the minibuffer.  Within the minibuffer,
  187. the following characters can be used for editing:
  188. \begin{define}{\hspace{1in}}
  189. \item[{\tt DEL, C-h}\hfill] Erase the last character. 
  190. \item[{\tt C-x, C-u}\hfill] Erase the entire input line. 
  191. \item[{\tt C-w}\hfill] Erase to the beginning of the previous word. 
  192. \item[{\tt C-q, $\backslash$}\hfill] Quote the next character typed. 
  193. \item[{\tt RET}\hfill] Signifies that you have completed typing in 
  194. the argument. 
  195. \item[{\tt C-g}\hfill] Abort the command in progress.
  196. \end{define}
  197. \section{Prefix Arguments}
  198. All commands accept an optional numeric prefix argument.  This is
  199. often interpreted as a repetition count.  For example, the function
  200. {\tt next-line}, if given a prefix argument, will move the cursor
  201. forward that many lines; without an argument, it will move the cursor
  202. forward one line.  A few commands behave differently if given a prefix
  203. argument than they do without one, and others ignore the prefix
  204. argument entirely. 
  205. \fname{digit-argument}{}{M-0, M-1, M-2, M-3, M-4, M-5, M-6, M-7, M-8, M-9}
  206. \fmore{negative-argument}{}{M--} 
  207. \fbody One way to specify a command argument is to use the escape key
  208. as a meta prefix, and then type one or more digits.  A dash may be
  209. used for a negative argument.
  210. \fname{universal-argument}{}{C-u}
  211. \fbody Another way to specify a command prefix is to type {\tt C-u}.
  212. Typing one {\tt C-u} is equivalent to a prefix argument of 4, typing
  213. two gives a value of 16, and so on.  In addition, you can type digits
  214. following {\tt C-u} to form a numeric prefix argument.
  215. \section{Aborting}
  216. \fname{keyboard-quit}{}{C-g}
  217. \fbody Typing {\tt C-g} cancels any command.  It is particularly useful
  218. for cancelling a command when MG is prompting for input in the minibuffer.
  219. \section{Extended Commands}
  220. \fname{execute-extended-command}{command}{M-x}
  221. \fbody Commands that are not bound to keys can be executed through 
  222. {\tt execute extended-command}.  If a prefix argument is supplied, it
  223. is passed to the command being executed.
  224. \chapter{Moving the Cursor}
  225. The commands described in this chapter move the cursor (sometimes
  226. called the point or dot) within the current window.  Commands which
  227. set the mark are included here as well.
  228. \fname{backward-char}{}{C-b}
  229. \fbody Moves the cursor backward (left) one character.  If the cursor
  230. is at the left margin, it will be moved to the end of the previous line.
  231. \fname{backward-paragraph}{}{M-[}
  232. \fbody Moves the cursor backwards to the beginning of the current
  233. paragraph, or to the beginning of the previous paragraph if the cursor
  234. is already at the beginning of a paragraph.
  235. \fname{backward-word}{}{M-b}
  236. \fbody Moves the cursor backwards to the beginning of the current word,
  237. or to the beginning of the previous word if the cursor is already at
  238. the beginning of a word.
  239. \fname{beginning-of-buffer}{}{M-<}
  240. \fbody Moves the cursor backwards to the beginning of the buffer.
  241. \fname{beginning-of-line}{}{C-a}
  242. \fbody Moves the cursor backwards to the beginning of the current
  243. line.  This command has no effect if the cursor is already at the beginning
  244. of the line.
  245. \fname{end-of-buffer}{}{M->}
  246. \fbody Moves the cursor forwards to the end of the buffer.
  247. \fname{end-of-line}{}{C-e}
  248. \fbody Moves the cursor forwards to the end of the current line.  This
  249. command has no effect if the cursor is already at the end of the line.
  250. \fname{exchange-point-and-mark}{}{C-x C-x}
  251. \fbody Set the mark at the current cursor position, and move the cursor
  252. to the old location of the mark.
  253. \fname{forward-char}{}{C-f}
  254. \fbody Moves the cursor forwards one character.  If the cursor is at the
  255. end of a line, it will be moved to the first character on the next line.
  256. \fname{forward-paragraph}{}{M-]}
  257. \fbody Moves the cursor forwards to the next paragraph delimiter.
  258. \fname{forward-word}{}{M-f}
  259. \fbody Moves the cursor forwards to the end of the current word, or to
  260. the end of the next word if the cursor is already at the end of a word.
  261. \fname{goto-line}{line-number}{}
  262. \fbody Moves the cursor to the beginning of line {\em line-number\/} in
  263. the buffer.
  264. \fname{next-line}{}{C-n}
  265. \fbody Moves the cursor down one line.  The cursor remains in the same
  266. column unless it would be past the end of the line, in which case it is
  267. moved to the end of the line.  At the end of the buffer, {\tt C-n} will
  268. create new lines.
  269. \fname{previous-line}{}{C-p}
  270. \fbody Moves the cursor up one line.    The cursor remains in the same
  271. column unless it would be past the end of the line, in which case it is
  272. moved to the end of the line.
  273. \fname{recenter}{}{C-l}
  274. \fbody Redraws the entire screen, scrolling the current window if necessary
  275. so that the cursor is near the center.  With a positive prefix argument 
  276. {\em n\/}, the window is scrolled so that the cursor is {\em n\/} lines
  277. from the top.  A negative prefix argument puts the cursor that many lines
  278. from the bottom of the window.
  279. \fname{redraw-display}{}{}
  280. \fbody Redraws the entire screen, but never scrolls.
  281. \fname{scroll-down}{}{M-v}
  282. \fbody Scrolls the display down (moving backward through the
  283. buffer).  Without 
  284. an argument, it scrolls slightly less than one windowful.  A prefix argument
  285. scrolls that many lines.
  286. \fname{scroll-one-line-down}{}{}
  287. \fmore{scroll-one-line-up}{}{}
  288. \fbody These functions are similar to {\tt scroll-down} and {\tt scroll-up}
  289. (respectively), but when invoked without an argument, cause the display 
  290. to scroll by one line only.  These functions are enabled by defining the
  291. compile-time option GOSMACS.
  292. \fname{scroll-other-window}{}{M-C-v}
  293. \fbody Scrolls the ``other'' window forward as for {\tt scroll-up}.
  294. \fname{scroll-up}{}{C-v}
  295. \fbody Scrolls the display up (moving forward through the buffer).  Without an
  296. an argument, it scrolls slightly less than one windowful.  A prefix argument
  297. scrolls that many lines.
  298. \fname{set-mark-command}{}{NUL}
  299. \fbody Set the mark at the current cursor position.
  300. \fname{what-cursor-position}{}{C-x =}
  301. \fbody Prints some information in the minibuffer about where the cursor is.
  302. \chapter{Text Insertion Commands}
  303. The usual way to insert text into a buffer is simply to type the
  304. characters.  The default binding for all of the printing characters
  305. ({\tt self-insert-command}) causes them to be inserted literally at
  306. the cursor position. 
  307. \fname{insert}{string}{}
  308. \fbody Insert {\em string\/} into the current buffer at the cursor position.
  309. \fname{newline}{}{RET}
  310. \fbody Insert a line break into the current buffer at the cursor position,
  311. moving the cursor forward to the beginning of the new line.
  312. \fname{newline-and-indent}{}{C-j}
  313. \fbody Insert a line break into the current buffer at the cursor position,
  314. then add extra whitespace so that the cursor is aligned in the same
  315. column as the first non-whitespace character in the previous line.
  316. \fname{open-line}{}{C-o}
  317. \fbody Inserts a line break into the current buffer at the current position,
  318. but does not move the cursor forward.
  319. \fname{quoted-insert}{}{C-q} 
  320. \fbody This command acts as a prefix to
  321. cancel the normal interpretation of the next keystroke.  If {\tt C-q}
  322. is followed by one to three octal digits, it is interpreted as the
  323. code of the character to insert.  Otherwise a single key is read and
  324. the character typed is inserted into the buffer instead of interpreted
  325. as a command.  This is used for inserting literal control characters
  326. into a buffer. 
  327. \fname{self-insert-command}{}{}
  328. \fbody This is the default binding for keys representing printable
  329. characters.  The character is inserted into the buffer at the cursor
  330. position, and the cursor moved forward.
  331. \chapter{Killing, Deleting, and Moving Text}
  332. When text is deleted, it is erased completely.  Killing text, on the
  333. other hand, moves it into a temporary storage area called the kill
  334. buffer.  The saved text in the kill buffer is erased when another
  335. block of text is killed.  Until then, however, you can retrieve text
  336. from the kill buffer.  This can be used to move or copy blocks of
  337. text, as well as to restore accidentally killed text.
  338. \fname{backward-kill-word}{}{M-DEL}
  339. \fbody Kill the text backwards from the cursor position to the beginning
  340. of the current word.  Typing {\tt M-DEL} several times in succession 
  341. prepends each killed word to the kill buffer.
  342. \fname{copy-region-as-kill}{}{M-w}
  343. \fbody Copies the text in the region into the kill buffer, without removing
  344. it from the current buffer.
  345. \fname{delete-backward-char}{}{DEL}
  346. \fbody Deletes the character to the left of the cursor.
  347. \fname{delete-blank-lines}{}{C-x C-o}
  348. \fbody Deletes all blank lines after the current line, and if the current
  349. line is blank, deletes it and all blank lines preceeding it as well.
  350. \fname{delete-char}{}{C-d}
  351. \fbody Deletes the character underneath the cursor.
  352. \fname{delete-horizontal-space}{}{M-$\backslash$}
  353. \fbody Deletes all spaces and tabs on either side of the cursor.
  354. \fname{just-one-space}{}{M-SPC}
  355. \fbody This is like {\tt delete-horizontal-space}, except it leaves a single
  356. space at the cursor position.
  357. \fname{kill-line}{}{C-k}
  358. \fbody If no prefix argument is specified, this function kills text up
  359. to the next newline; or if the cursor is at the end of a line, the newline
  360. is killed.  A prefix argument specifies how many lines to kill.  Typing
  361. {\tt C-k} several times in succession appends each line to the kill buffer.
  362. \fname{kill-paragraph}{}{}
  363. \fbody This command kills the entire paragraph containing the cursor.
  364. If the cursor is positioned between paragraphs, the next paragraph is killed.
  365. \fname{kill-region}{}{C-w}
  366. \fbody The region (all text between point and mark) is killed.
  367. \fname{kill-word}{}{M-d}
  368. \fbody Text is killed forward from the cursor position to the next
  369. end of word.  If the cursor is at the end of the word, then the next
  370. word is killed.  Typing {\tt M-d} several times appends the killed
  371. text to the kill buffer.
  372. \fname{yank}{}{C-y}
  373. \fbody Text is copied from the kill buffer into the current buffer at
  374. the cursor position.  The cursor is moved to the end of the inserted
  375. text.
  376. \chapter{Searching and Replacing}
  377. \section{Searching}
  378. The ordinary search command in MG differs from that in many other editors
  379. in that it is incremental:  it begins searching as soon as you begin
  380. typing the search string, instead of waiting for you to type the entire
  381. string.
  382. All of the search commands described in this section are case-insensitive.
  383. \fname{isearch-backward}{pattern}{C-r}
  384. \fmore{isearch-forward}{pattern}{C-s}
  385. \fbody These commands perform an incremental search backward and 
  386. forward (respectively) for {\em pattern\/}.  MG will move the cursor 
  387. to the place in the buffer that matches as much of the pattern as you 
  388. have typed so far, as each character is entered.
  389. Within the incremental search, the following characters are interpreted
  390. specially:
  391. \begin{define}{\hspace{1in}}
  392. \item[{\tt DEL}\hfill] Erase the last character in the search string. 
  393. \item[{\tt ESC}\hfill] Stop searching; exit from incremental search
  394. mode, leaving the cursor where the search brought it. 
  395. \item[{\tt C-g}\hfill] If a match has been found, exits from
  396. incremental search but leaves the cursor in its original position.  If
  397. the search has failed, this will just erase the characters which have
  398. not been found from the end of the search pattern.  In this case, you
  399. must type \verb"C-g" again to abort the search. 
  400. \item[{\tt C-s}\hfill] Search forward for the next occurrence of the
  401. same pattern. 
  402. \item[{\tt C-r}\hfill] Search backward for the previous occurrence of
  403. the same pattern. 
  404. \item[{\tt C-q}\hfill] ``Quotes'' the next character typed, forcing it
  405. to be interpreted as a literal character in the search pattern.
  406. \end{define}
  407. In addition, normal commands such as \verb"C-a" that do not have special
  408. meanings within incremental search cause the search to be terminated, and
  409. then are executed in the ordinary way.
  410. \fname{search-again}{}{}
  411. \fmore{search-backward}{pattern}{M-r}
  412. \fmore{search-forward}{pattern}{M-s}
  413. \fbody These commands perform ordinary, non-incremental searches.
  414. {\tt Search-again} uses the same pattern and direction as the previous
  415. search.
  416. \section{Replacing}
  417. \fname{query-replace}{pattern replacement}{M-\%}
  418. \fbody The primary replace command in MG is an interactive query replace.
  419. MG searches forward for occurrences of {\em pattern\/}, and asks you what
  420. to do about each one.  The choices are:
  421. \begin{define}{\hspace{1in}}
  422. \item[{\tt SPC}\hfill] Replace this match with {\em replacement\/},
  423. and go on to the next. 
  424. \item[{\tt DEL}\hfill] Skip to the next match without replacing this one. 
  425. \item[{\tt .}\hfill] Replace this match, and then quit. 
  426. \item[{\tt !}\hfill] Replace all remaining occurrences without asking again. 
  427. \item[{\tt ESC}\hfill] Quit.
  428. \end{define}
  429. By default, {\tt query-replace} adjusts the case of lower-case letters
  430. in the replacement string to match that of the
  431. particular occurrence of the pattern; for example, replacing ``Foo''
  432. with ``bar'' results in ``Bar''.  Upper case letters in the replacement
  433. string are always left uppercase.   In addition, supplying a prefix argument
  434. will also tell {\tt query-replace} to leave the case of the replacement
  435. string as-is.
  436. Note that {\tt query-replace} always performs a case-insensitive search.
  437. \section{Regular Expressions}
  438. Regular expressions provide a means for specifying complex search
  439. patterns, instead of just a literal string.  The commands in this
  440. section are available only if MG is compiled with the REGEX option
  441. defined. 
  442. Regular expression syntax uses the following rules.  Most characters
  443. in a regular expression are considered to be {\em ordinary\/} characters,
  444. and will match themselves and nothing else.  The exceptions are the
  445. special characters listed below.
  446. \begin{define}{\hspace{1in}}
  447. \item[{\tt .}\hfill] Matches any single character except a newline.  
  448. \item[{\tt *}\hfill] A suffix operator that matches zero or more
  449. repetitions of the (smallest) preceding regular expression. 
  450. \item[{\tt +}\hfill] A suffix operator that matches one or more
  451. repetitions of the (smallest) preceding regular expression. 
  452. \item[{\tt ?}\hfill] A suffix operator that matches either zero or one
  453. occurence of the (smallest) preceding regular expression. 
  454. \item[{\tt [\ldots]}\hfill] Matches any one character listed in the
  455. character set between the square brackets.  See examples below. 
  456. \item[{\tt \^{ }}\hfill] Matches at the beginning of a line. 
  457. \item[{\tt \$}\hfill] Matches at the end of a line. 
  458. \item[{\tt $\backslash$}\hfill] Except for the situations listed
  459. below, acts as a prefix operator which causes the character following
  460. to be treated as an ordinary character. 
  461. \item[{\tt $\backslash$|}\hfill] An infix binary {\em or\/} operator.
  462. It applies to the two largest surrounding expressions. 
  463. \item[{\tt $\backslash$(\ldots$\backslash$)}\hfill] A grouping construct,
  464. usually used to specify a larger expression for postfix operators such
  465. as \verb"*" or to limit the scope of operands to \verb"\|". 
  466. \item[{\tt $\backslash${\em digit\/}}\hfill] Matches the same text
  467. matched by the {\em digit\/}th \verb"\(...\)" construct.  These are
  468. numbered from 1 to 9 in the order that the open-parentheses appear. 
  469. \item[{\tt $\backslash$`}\hfill] Matches at the beginning of the buffer. 
  470. \item[{\tt $\backslash$'}\hfill] Matches at the end of the buffer. 
  471. \item[{\tt $\backslash$b}\hfill] Matches at the beginning or end of a word. 
  472. \item[{\tt $\backslash$B}\hfill] Matches anyplace {\em except\/} at
  473. the beginning or end of a word. 
  474. \item[{\tt $\backslash$<}\hfill] Matches at the beginning of a word. 
  475. \item[{\tt $\backslash$>}\hfill] Matches at the end of a word. 
  476. \item[{\tt $\backslash$w}\hfill] Matches any word-constituent character. 
  477. \item[{\tt $\backslash$W}\hfill] Matches any character which is {\em
  478. not\/} a word-constituent. 
  479. \end{define}
  480. Some examples may help clarify the rules.
  481. \begin{define}{\hspace{1in}}
  482. \item[{\tt foo}\hfill] Matches the literal string {\tt foo}. 
  483. \item[{\tt ;.*}\hfill] Matches all strings which begin with a
  484. semicolon and continue to the end of a line. 
  485. \item[{\tt c[ad]+r}\hfill] Matches strings of the form {\tt car}, {\tt
  486. cdr}, {\tt caar}, {\tt cadr}, and so on. 
  487. \item[{\tt [a-z]}\hfill] Matches any lowercase letter. 
  488. \item[{\tt [\^{ }a-z]}\hfill] Matches any character {\em except\/}
  489. lowercase letters. 
  490. \item[{\tt [0-9+---]}\hfill] Matches a digit or sign. 
  491. \item[{\tt $\backslash$(foo$\backslash$|bar$\backslash$)}\hfill]
  492. Matches either the string {\tt foo} or the string {\tt bar}. 
  493. \end{define}
  494. \fname{count-matches}{pattern}{}
  495. \fmore{count-non-matches}{pattern}{}
  496. \fbody These commands count the number of lines which do or do not
  497. (respectively) match the specified pattern.
  498. \fname{delete-matching-lines}{pattern}{}
  499. \fmore{delete-non-matching-lines}{pattern}{}
  500. \fbody These commands delete all lines which do or do not (respectively)
  501. match the specified pattern.
  502. \fname{query-replace-regexp}{pattern replacement}{}
  503. \fbody This is the regular expression version of {\tt query-replace}.
  504. The {\em replacement\/} string may be a constant, or it can refer to
  505. all or part of the string matched by the {\em pattern\/}.  \verb"\&" in
  506. the replacement string expands into the entire text being replaced,
  507. while \verb"\"{\em n\/} (where {\em n\/} is a number) replaces the 
  508. {\em n\/}th parenthesized expression in {\em pattern\/}.
  509. \fname{re-search-again}{}{}
  510. \fmore{re-search-backward}{pattern}{}
  511. \fmore{re-search-forward}{pattern}{}
  512. \fbody These are the regular expression equivalents of the ordinary
  513. non-incremental search commands.
  514. \fname{set-case-fold-search}{}{}
  515. \fbody This command toggles an internal variable that controls whether
  516. the regular expression search and replace commands pay attention to
  517. case.  By default, regular expression searches are case-insensitive.
  518. Ordinary searches are always case-insensitive and are not affected by
  519. the setting of this variable.
  520. \chapter{Windows}
  521. MG initially has only one text window displayed.  However, you can have
  522. as many windows as will fit on the screen.  Each window has its own mode
  523. line and must display at least two lines of text.  (Note that a MG's
  524. ``windows'' are distinct from the ``windows'' handled by screen managers
  525. such as the X Window System.)
  526. Multiple windows may be used to display different buffers.  You can also
  527. have the same buffer displayed in more than one window, which is useful
  528. if you want to see one part of a file at the same time as you are editing
  529. another part.
  530. Although many windows can be displayed at once, only one window is active 
  531. at any given time.  This is the window where the cursor appears.
  532. Some commands refer to the ``other'' window.  This is the window directly
  533. below the current window, or the top window if you are in the bottom window.
  534. \fname{delete-other-windows}{}{C-x 1}
  535. \fbody Makes the current window the only window.
  536. \fname{delete-window}{}{C-x 0}
  537. \fbody Deletes the current window, making the ``other'' window the
  538. current window.  This command doesn't do anything useful if there is only
  539. one window being displayed.
  540. \fname{enlarge-window}{}{C-\^{ }}
  541. \fbody Makes the current window larger.  Without a prefix argument, the
  542. window grows one line; otherwise, the prefix argument specifies how many
  543. lines to grow.
  544. \fname{other-window}{}{C-x o}
  545. \fbody Makes the ``other'' window the current window.
  546. \fname{previous-window}{}{}
  547. \fbody This is like {\tt other-window}, except that it cycles through
  548. the windows in reverse order.  This command is available only if MG was
  549. compiled with the GOSMACS option defined.
  550. \fname{shrink-window}{}{}
  551. \fbody Makes the current window smaller.  Without a prefix argument, the
  552. window loses one line; otherwise, the prefix argument specifies how many
  553. lines go away.
  554. \fname{split-window-vertically}{}{C-x 2}
  555. \fbody Split the current window into two windows, both using the same
  556. buffer.
  557. \chapter{Files and Buffers}
  558. Most buffers are used to contain a file being edited.  It is
  559. also possible to have buffers that are not associated with any file;
  560. MG uses these for purposes such as displaying help text, for example.
  561. However, since most commands for dealing with files also deal with
  562. buffers, we have grouped all of these commands together into one chapter.
  563. \section{Buffer Manipulation}
  564. \fname{insert-buffer}{buffer-name}{}
  565. \fbody Inserts the contents of the named buffer into the current buffer
  566. at the cursor location.  The cursor moves to the end of the inserted
  567. text.
  568. \fname{kill-buffer}{buffer-name}{C-x k}
  569. \fbody The named buffer and its contents are deleted.  If the buffer has
  570. been marked as modified, MG will ask you if you really want to delete it.
  571. Note that, contrary to its name, this command {\em does not\/} save the
  572. buffer contents in the kill buffer.
  573. If a buffer is being displayed in a window when it is deleted, MG will 
  574. find some other buffer to display in the same window.
  575. \fname{list-buffers}{}{C-x C-b}
  576. \fbody This command writes information about the buffers currently in
  577. use to a buffer named {\tt *Buffer List*}.  This buffer is then displayed
  578. in the ``other'' window; if there is only one window, this command will
  579. split the screen into two windows.
  580. \fname{not-modified}{}{M-\~{ }}
  581. \fbody This command makes MG think that the current buffer has not been
  582. modified, even if it really has been changed.  This affects the behavior
  583. of the {\tt kill-buffer} and the buffer-saving commands described below.
  584. MG indicates modified buffers with two stars at the left end of the mode
  585. line.
  586. \fname{switch-to-buffer}{buffer-name}{C-x b}
  587. \fbody The current window is mapped onto the named buffer.  If there
  588. isn't already a buffer with that name around, MG will create one.
  589. \fname{switch-to-buffer-other-window}{buffer-name}{C-x 4 b}
  590. \fbody This command works like {\tt switch-to-buffer}, except that the
  591. ``other'' window is used.  If there is only one window, this command
  592. splits the screen into two windows and maps the named buffer onto one
  593. of them.
  594. \section{Reading and Writing Files}
  595. \fname{find-file}{file-name}{C-x f}
  596. \fmore{find-file-other-window}{file-name}{C-x 4 C-f}
  597. \fbody These commands are analagous to {\tt switch-to-buffer} and {\tt
  598. switch-to-buffer-other-window}, respectively.  The difference is that
  599. these commands look for a buffer associated with the named file.  If no
  600. matching buffer is found, MG will create a new buffer with a name
  601. derived from the filename, and attempt to read the file into the buffer.
  602. If the named file cannot be opened, the buffer remains empty.
  603. \fname{insert-file}{file-name}{C-x i}
  604. \fbody This command reads in the contents of the named file into the
  605. current buffer at the cursor position.  The cursor remains in the same
  606. place.
  607. \fname{save-buffer}{}{C-x C-s}
  608. \fbody If the current buffer has been modified, it is saved.  Buffers
  609. that are not associated with files cannot be written out with this
  610. command.
  611. \fname{save-buffers-kill-emacs}{}{C-x C-c}
  612. \fbody This command is used to leave MG and return control to the shell
  613. or other program that was used to start MG.  If there are modified buffers,
  614. MG will ask you if you want to save them before exiting.
  615. \fname{save-some-buffers}{}{C-x s}
  616. \fbody MG will ask you if you want to save modified buffers that are
  617. associated with files.
  618. \fname{write-file}{file-name}{C-x C-w}
  619. \fbody The current buffer is written out using the file name supplied.
  620. This is useful for saving buffers that are not associated with files, or
  621. for writing out a file with a different name than what was used to read
  622. it in.
  623. \section{Backup Files}
  624. MG provides a way to save a copy of the original version of files which 
  625. have been modified and then written out again.  The backup copy reflects
  626. the state of the file as it existed the first time it was read into MG.
  627. The name used for the backup file varies, depending on the operating
  628. system.
  629. This feature is disabled if MG is compiled with NO\_BACKUP defined.
  630. \fname{make-backup-files}{}{} 
  631. \fbody This command is a toggle which
  632. controls the state of an internal variable that determines whether MG
  633. creates backup files. 
  634. \section{Changing the Directory}
  635. The commands in this section are disabled by defining NO\_DIR.
  636. \fname{cd}{directory-name}{}
  637. \fbody This command changes MG's notion of the ``current'' directory
  638. or pathname.  This is used to supply defaults for functions that read 
  639. or write files.
  640. The syntax for {\em directory-name\/} is obviously specific to the
  641. particular operating system MG is running on.
  642. \fname{pwd}{}{}
  643. \fbody Display what MG thinks is the current directory.
  644. \chapter{Modes}
  645. Modes are used to locally alter the bindings of keys on a 
  646. buffer-by-buffer basis.  MG is normally in fundamental mode, and these
  647. are the bindings that are listed with the command descriptions in 
  648. this manual.  Modes define additional keymaps that are searched for
  649. bindings before the fundamental mode bindings are examined; see the
  650. section on key binding below for more details on how this works.
  651. \fname{set-default-mode}{mode-name}{}
  652. \fbody Normally, when MG visits a file, it puts the associated buffer
  653. into fundamental mode.  Using the {\tt set-default-mode} command, you
  654. can specify that MG should default to use some other mode on all subsequent
  655. buffers that are created.  This command is a toggle.  With no prefix
  656. argument, if the named mode is not already on the list of
  657. default modes, then it will be added to the list; otherwise, it is removed
  658. from the list.
  659. \section{No Tab Mode}
  660. In notab mode, tabs are expanded into spaces instead of inserted
  661. literally into the buffer.  Literal tab characters are displayed as
  662. \verb"^I" (much like other control characters).  These commands are
  663. available if MG is compiled with the symbol NOTAB defined.  (This mode
  664. is mainly for use on systems such as PRIMOS that do not treat tab as a
  665. series of spaces.)
  666. \fname{no-tab-mode}{}{}
  667. \fbody This command is a toggle to control whether notab mode is in effect.
  668. \fname{space-to-tabstop}{}{}
  669. \fbody Insert enough spaces to move the cursor to the next tab stop.  In
  670. notab mode, this function is bound to {\tt C-i}.
  671. \section{Overwrite Mode}
  672. Normally, when characters are inserted into the buffer, they are spliced
  673. into the existing text.  In overwrite mode, inserting a character causes
  674. the character already at the cursor position to be replaced.  This is
  675. useful for editing pictures, tables, and the like.
  676. \fname{overwrite-mode}{}{}
  677. \fbody This command is a toggle which controls whether overwrite mode is
  678. in effect.
  679. \section{Auto Fill}
  680. Fill mode causes newlines to be added automatically at word
  681. breaks when text is added at the end of a line, extending past the
  682. right margin.  Auto fill is useful for editing text and documentation
  683. files.
  684. \fname{auto-fill-mode}{}{}
  685. \fbody This command is a toggle which controls whether fill mode is
  686. in effect.
  687. \fname{insert-with-wrap}{}{}
  688. \fbody This command works like {\tt self-insert}, except that it checks
  689. to see if the cursor has passed the right margin.  If so, it fills
  690. the line by inserting a line break between words.  This command is bound to 
  691. {\tt SPC} in fill mode.
  692. \fname{fill-paragraph}{}{M-q}
  693. \fbody Fill the paragraph containing the cursor.
  694. \fname{set-fill-column}{}{C-x f}
  695. \fbody Without a prefix argument, this command sets the right margin
  696. at the current cursor column.  If a prefix argument is supplied, it is used
  697. instead as the line width.
  698. \section{Auto Indent}
  699. Indent mode binds {\tt RET} to {\tt newline-and-indent}, so
  700. that each new line is indented to the same level as the preceeding
  701. line.  This mode is useful for editing code. 
  702. \fname{auto-indent-mode}{}{}
  703. \fbody This command is a toggle which controls whether auto-indent mode
  704. is in effect.
  705. \section{Blink}
  706. Blink mode makes it easier to match parentheses, brackets, and other
  707. paired delimiters.  When the closing delimiter is typed, the cursor
  708. moves momentarily to the matching opening delimiter (if it is on the
  709. screen), or displays the line containing the matching delimiter on the
  710. echo line.  This is useful for editing Lisp or C code, or for
  711. preparing input files for text processors such as LaTeX that use
  712. paired delimiters. 
  713. \fname{blink-matching-paren}{}{}
  714. \fbody This command is a toggle which controls whether blink mode is
  715. in effect.
  716. \fname{blink-matching-paren-hack}{}{}
  717. \fbody This function behaves like {\tt self-insert}, except that it
  718. finds the matching delimiter as described above.  In blink mode, this
  719. function is bound to \verb")", which flashes the matching \verb"(".  This
  720. function also knows about the pairs \verb"{}", \verb"[]", and \verb"<>".
  721. All other characters match with themselves.
  722. \section{Dired Mode}
  723. ``Dired'' is an abbreviation for ``directory editor'', and it provides a way
  724. to browse through the contents of a directory from with MG.  Dired puts
  725. a directory listing into a buffer; you can use normal editing commands to
  726. move around the buffer, and a special group of commands to manipulate
  727. the files.  For example, there are commands to delete and rename files,
  728. and to read a file into an MG buffer.
  729. Since dired mode rebinds many keys, a table may be helpful:
  730. \begin{verbatim}
  731.     C-d      dired-flag-file-deleted
  732.     SPC      next-line
  733.     c        dired-copy-file
  734.     d        dired-flag-file-deleted
  735.     e        dired-find-file
  736.     f        dired-find-file
  737.     n        next-line
  738.     o        dired-find-file-other-window
  739.     p        previous-line
  740.     r        dired-renamefile
  741.     u        dired-unflag
  742.     x        dired-do-deletions
  743.     DEL      dired-backup-unflag
  744. \end{verbatim}
  745. The commands in this section are disabled by defining NO\_DIRED.
  746. \fname{dired}{directory-name}{C-x d}
  747. \fbody Creates a dired buffer for the given directory name, and displays
  748. it in the current window.  The files
  749. in the directory are listed, usually along with information about the
  750. file such as its size and timestamp.  The exact format of the information
  751. is system-specific.
  752. \fname{dired-backup-unflag}{}{}
  753. \fbody This function removes the deletion flag from the file listed on
  754. the previous line of the dired buffer.
  755. \fname{dired-copy-file}{new-name}{}
  756. \fbody Copy the file listed on the current line of the dired buffer.
  757. \fname{dired-do-deletions}{}{}
  758. \fbody Deletes the files that have been flagged for deletion.
  759. \fname{dired-find-file}{}{}
  760. \fmore{dired-find-file-other-window}{}{}
  761. \fbody These function works like {\tt find-file} and 
  762. {\tt find-file-other-window}, except that the filename is taken 
  763. from the current line in the dired buffer.
  764. \fname{dired-flag-file-deleted}{}{}
  765. \fbody Flag the file listed on the current line for deletion.  This is
  766. indicated in the buffer by putting a ``D'' at the left margin.  No
  767. files are not actually deleted until the function {\tt dired-do-deletions}
  768. is executed.
  769. \fname{dired-other-window}{directory-name}{}
  770. \fbody This function works just like {\tt dired}, except that it puts the
  771. dired buffer in the ``other'' window.
  772. \fname{dired-rename-file}{new-name}{}
  773. \fbody Renames the file listed on the current line of the dired buffer.  
  774. Note that the dired buffer is not updated to reflect the change.
  775. \fname{dired-unflag}{}{}
  776. \fbody Remove the deletion flag for the file on the current line.
  777. \chapter{Miscellaneous}
  778. \section{Help}
  779. Most of the commands in this section write useful information to the
  780. {\tt *help*} buffer, which is then displayed in the ``other'' window.
  781. These commands can be disabled at compile-time by defining NO\_HELP.
  782. \fname{apropos}{topic}{C-h a}
  783. \fbody This command lists all functions whose names contain a string
  784. matching {\em topic\/} in the {\tt *help*} buffer.
  785. \fname{describe-bindings}{}{C-h b}
  786. \fbody Information about the key bindings in effect in the current buffer
  787. is listed in the {\tt *help*} buffer.
  788. \fname{describe-key-briefly}{key}{C-h c}
  789. \fbody Information about the binding of {\em key\/} is printed in the
  790. minibuffer.
  791. \fname{help-help}{option}{C-h C-h}
  792. \fbody This command lists all of the help options available and
  793. prompts for which one to run.  Currently, these include only {\tt a}
  794. to run {\tt apropos}, {\tt b} to run {\tt describe-bindings}, and {\tt c}
  795. to run {\tt describe-key-briefly}.
  796. \section{Keyboard Macros}
  797. A keyboard macro is a saved set of commands from the keyboard that can be
  798. reexecuted later on.  There can only be one keyboard macro defined at
  799. any one time.
  800. The commands in this section are available unless they have been disabled
  801. by defining NO\_MACRO.
  802. \fname{call-last-kbd-macro}{}{C-x e}
  803. \fbody Execute the saved keyboard macro.  A prefix argument can be used
  804. to specify a repetition count.
  805. \fname{end-kbd-macro}{}{C-x )}
  806. \fmore{start-kbd-macro}{}{C-x (}
  807. \fbody These functions are used to define a keyboard macro.  All keys
  808. entered after {\tt start-kbd-macro} is executed, up to a {\tt end-kbd-macro},
  809. are remembered as they are executed.  You can then reexecute the same
  810. sequence of operations using {\tt call-last-kbd-macro}.
  811. \section{Changing Case}
  812. MG provides a number of functions for changing the case of text.
  813. \fname{capitalize-word}{}{M-c}
  814. \fmore{downcase-region}{}{C-x C-l}
  815. \fmore{downcase-word}{}{M-l}
  816. \fmore{upcase-region}{}{C-x C-u}
  817. \fmore{upcase-word}{}{M-u}
  818. \fbody All of these commands do the obvious.
  819. \section{Odds and Ends}
  820. This section describes miscellaneous commands that don't fit into any
  821. particular category.
  822. \fname{emacs-version}{}{}
  823. \fbody Prints information about the version of MG you are running in
  824. the minibuffer.
  825. \fname{meta-key-mode}{}{}
  826. \fbody If the particular version of MG you are running supports a meta key,
  827. this function can be used to determine whether MG actually pays attention
  828. to it or not.  If no prefix argument is supplied, the internal variable
  829. that controls the use of the meta key is toggled; a positive value enables
  830. the meta key, while a negative value disables it.
  831. \fname{prefix-region}{}{}
  832. \fmore{set-prefix-string}{string}{}
  833. \fbody {\tt Prefix-region} is used to prefix each line of the region
  834. with a string.  This is useful for indenting quoted text, making block
  835. comments, and the like.  The function {\tt set-prefix-string} can be
  836. used to set the string used as the prefix.
  837. \fname{suspend-emacs}{}{C-z} 
  838. \fbody This command temporarily suspends
  839. MG so that you can run other programs, and later resume editing.  The
  840. exact behavior depends on which operating system you are running MG
  841. under.  Typically, MG will either spawn a new shell as a subprocess, or
  842. return you to the parent process.
  843. \fname{transpose-chars}{}{C-t}
  844. \fbody This command transposes the previous two characters.
  845. \chapter{Customization}
  846. MG provides a limited support for customization.  However, unlike ``real'' 
  847. Emacs, there is no extension language for interpretively defining new 
  848. functions.
  849. \section{Key Bindings}
  850. MG allows keys to be rebound locally or globally.  To understand the
  851. difference between the two, some discussion on how modes are implemented
  852. is necessary.
  853. An internal data structure called a keymap is used to look up the
  854. function that is bound to a particular key.  The keymap for
  855. fundamental mode contains all of the default bindings which are listed
  856. with the command descriptions in this manual.  Modes define additional
  857. keymaps that are searched for a binding before the fundamental mode
  858. keymap is examined.  Keymaps have the same name as the mode they are
  859. associated with.
  860. MG does not provide commands for defining new modes, but you can alter
  861. the keymaps for existing modes.
  862. \fname{define-key}{keymap-name key command}{}
  863. \fbody This command can be used to modify the keymap for the named mode.
  864. \fname{global-set-key}{key command}{}
  865. \fmore{global-unset-key}{key}{}
  866. \fbody These commands modify the keymap for fundamental mode.  Bindings
  867. established by {\tt global-set-key} will be inherited by all other modes, 
  868. as long as they do not establish local rebindings of the same key.
  869. \fname{local-set-key}{key command}{}
  870. \fmore{local-unset-key}{key}{}
  871. \fbody These commands modify the keymap currently in effect.
  872. \section{Startup Files}
  873. Although MG does not include a general-purpose extension language, it
  874. does provide a way to read and evaluate commands using a somewhat
  875. different syntax than that used for executing extended commands.  This
  876. is typically used in a startup file to modify key bindings.
  877. A startup file consists of one or more expressions.  Each expression must
  878. appear on a separate line in the file; there may not be more than one
  879. expression per line, nor may expressions span across line breaks.
  880. Whitespace (spaces and tabs) separate the tokens in an expression.  For
  881. historical reasons, parentheses are also considered to be whitespace in
  882. this context.  A semicolon acts as a comment character, causing the rest
  883. of the line to be discarded.
  884. An expression consists of a function name, an optional prefix argument
  885. (given as an integer constant), and arguments to be passed to the
  886. function.  If an argument includes literal whitespace or nonprintable
  887. characters (for example, as in a keystroke argument to one of the key
  888. binding functions described in the previous section), it must be
  889. supplied as a string constant enclosed in double quotes. 
  890. Within string constants, the following backslash escapes are available
  891. to specify nonprintable characters:
  892. \begin{define}{\hspace{1in}}
  893. \item[{\tt $\backslash$t, $\backslash$T}\hfill] Tab 
  894. \item[{\tt $\backslash$n, $\backslash$N}\hfill] Newline 
  895. \item[{\tt $\backslash$r, $\backslash$R}\hfill] Carriage return 
  896. \item[{\tt $\backslash$e, $\backslash$E}\hfill] Escape (Meta prefix) 
  897. \item[{\tt $\backslash$\^{ }}\hfill] Control prefix 
  898. \item[{\tt $\backslash${\em n\/}}\hfill] Specifies a character by its
  899. ASCII code, where {\em n\/} may consist of from one to three octal
  900. digits
  901. \item[{\tt $\backslash$f{\em n\/}, $\backslash$F{\em n\/}}\hfill]
  902. Specifies the keycode for the {\em n\/}th function key.  {\em N\/} may
  903. consist of one or two decimal digits. 
  904. \end{define}
  905. The following commands which deal with evaluation of expressions are
  906. disabled by defining the compile-time option NO\_STARTUP.  See the
  907. implementation notes for your particular version of MG for information
  908. on how it handles startup files. 
  909. \fname{eval-current-buffer}{}{}
  910. \fbody Evaluate the expressions in the current buffer.
  911. \fname{eval-expression}{expression}{}
  912. \fbody Evaluate the expression supplied.
  913. \fname{load}{file-name}{}
  914. \fbody Read in the specified file and evaluate its contents.
  915. \twocolumn[\Huge{\vspace{2em}{\bf Fundamental Mode Key Bindings}\vspace{1.5em}}]
  916. \addcontentsline{toc}{chapter}{Fundamental Mode Key Bindings}
  917. \begin{verbatim}
  918. NUL       set-mark-command
  919. C-a       beginning-of-line
  920. C-b       backward-char
  921. C-d       delete-char
  922. C-e       end-of-line
  923. C-f       forward-char
  924. C-g       keyboard-quit
  925. C-h       help
  926. TAB       self-insert-command
  927. C-j       newline-and-indent
  928. C-k       kill-line
  929. C-l       recenter
  930. RET       newline
  931. C-n       next-line
  932. C-o       open-line
  933. C-p       previous-line
  934. C-q       quoted-insert
  935. C-r       isearch-backward
  936. C-s       isearch-forward
  937. C-t       transpose-chars
  938. C-u       universal-argument
  939. C-v       scroll-up
  940. C-w       kill-region
  941. C-x       c-x prefix
  942. C-y       yank
  943. C-z       suspend-emacs
  944. ESC       meta prefix
  945. SPC .. ~  self-insert-command
  946. DEL       delete-backward-char
  947. C-h C-g   keyboard-quit
  948. C-h C-h   help-help
  949. C-h a     apropos
  950. C-h b     describe-bindings
  951. C-h c     describe-key-briefly
  952. C-x C-b   list-buffers
  953. C-x C-c   save-buffers-kill-emacs
  954. C-x C-f   find-file
  955. C-x C-g   keyboard-quit
  956. C-x C-l   downcase-region
  957. C-x C-o   delete-blank-lines
  958. C-x C-s   save-buffer
  959. C-x C-u   upcase-region
  960. C-x C-w   write-file
  961. C-x C-x   exchange-point-and-mark
  962. C-x (     start-kbd-macro
  963. C-x )     end-kbd-macro
  964. C-x 0     delete-window
  965. C-x 1     delete-other-windows
  966. C-x 2     split-window-vertically
  967. C-x 4     c-x 4 prefix
  968. C-x =     what-cursor-position
  969. C-x ^     enlarge-window
  970. C-x b     switch-to-buffer
  971. C-x d     dired
  972. C-x e     call-last-kbd-macro
  973. C-x f     set-fill-column
  974. C-x i     insert-file
  975. C-x k     kill-buffer
  976. C-x o     other-window
  977. C-x s     save-some-buffers
  978. C-x 4 C-f find-file-other-window
  979. C-x 4 C-g keyboard-quit
  980. C-x 4 b   switch-to-buffer-other-window
  981. C-x 4 f   find-file-other-window
  982. M-C-g     keyboard-quit
  983. M-C-v     scroll-other-window
  984. M-SPC     just-one-space
  985. M-%       query-replace
  986. M--       negative-argument
  987. M-0       digit-argument
  988. M-1       digit-argument
  989. M-2       digit-argument
  990. M-3       digit-argument
  991. M-4       digit-argument
  992. M-5       digit-argument
  993. M-6       digit-argument
  994. M-7       digit-argument
  995. M-8       digit-argument
  996. M-9       digit-argument
  997. M-<       beginning-of-buffer
  998. M->       end-of-buffer
  999. M-[       backward-paragraph
  1000. M-\       delete-horizontal-space
  1001. M-]       forward-paragraph
  1002. M-b       backward-word
  1003. M-c       capitalize-word
  1004. M-d       kill-word
  1005. M-f       forward-word
  1006. M-l       downcase-word
  1007. M-q       fill-paragraph
  1008. M-r       search-backward
  1009. M-s       search-forward
  1010. M-u       upcase-word
  1011. M-v       scroll-down
  1012. M-w       copy-region-as-kill
  1013. M-x       execute-extended-command
  1014. M-~       not-modified
  1015. M-DEL     backward-kill-word
  1016. \end{verbatim}
  1017. \begin{theindex}
  1018. \addcontentsline{toc}{chapter}{Index}
  1019. \input{mgidx.tex}
  1020. \end{theindex}
  1021. \end{document}
  1022.